home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12654 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  856 b 

  1. Path: nntp.teleport.com!usenet
  2. From: qp7@teleport.com (QP7)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Overload
  5. Date: Thu, 21 Mar 1996 01:24:34 GMT
  6. Organization: SHATTERED PERSPECTIVES
  7. Message-ID: <4iqb2o$k11@nadine.teleport.com>
  8. References: <4iju56$m68@tic.sm.dsi.unimi.it>
  9. NNTP-Posting-Host: ip-pdx03-26.teleport.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. moreld@dsi.unimi.it (~ZIO BUDDA~) wrote:
  13.  
  14. >Hi, this is my question :
  15.  
  16. >i have thi class :
  17.  
  18. >class Foo {
  19. >    char *a;
  20. >    String b;
  21.  
  22. >   public:
  23. >    char *GET();
  24. >    String GET(); 
  25. >};
  26.  
  27. >why this overload is not poxible????
  28. >I don't want two function with 2 name, i want 2 function with the same name.
  29.  
  30. The two GET() functions are ambiguous to the compiler unless the
  31. argument lists are different.  Just making the return types different
  32. isn't enough --- you've got to have different argument types.
  33.  
  34. - QP7 -
  35.  
  36.  
  37.